package com.maserb.monitor.repository.schoolForum;

import com.maserb.monitor.entity.schoolForum.CommentEntity;
import com.maserb.monitor.entity.schoolForum.CommentReplyEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentReplyRepository extends JpaSpecificationExecutor<CommentReplyEntity>
        , PagingAndSortingRepository<CommentReplyEntity, String> {

    List<CommentReplyEntity> findTop3ByCommentOrderByCreateTimeDesc(CommentEntity comment);
}
